#ifndef PARSE_TABLE_BUILDER_H
#define PARSE_TABLE_BUILDER_H

#include "Grammar.h"
#include <unordered_map>
#include <string>
#include <vector>

class ParseTableBuilder {
public:
    using Symbol = std::string;
    using Production = std::vector<Symbol>;

    ParseTableBuilder(const Grammar& grammar);

    void build();
    void print() const;

    const std::unordered_map<Symbol, std::unordered_map<Symbol, Production>>& getTable() const;

private:
    const Grammar& grammar_;
    std::unordered_map<Symbol, std::unordered_map<Symbol, Production>> parseTable_;
};

#endif
